// 基于template/src/widgets/{{appEntities}}/{{ctrls@FORM}}-form/{{spinalCase ctrl.codeName}}-form-vo.ts.hbs生成
import { ControlVOBase } from '@/core';
import { transformValue } from '@/utils';
import { model } from './main-form-model';

export class FormControlVO extends ControlVOBase {
	constructor(data: any) {
		//  表单预置字段
		data.srfwfmemo = data['srfwfmemo'] ? data['srfwfmemo'] : '';
		data.srffrontuf = data['srffrontuf'] ? data['srffrontuf'] : '';
		super(data);
		//  表单自持属性
		this.$ownKeys = [
			'srforikey',
			'srfkey',
			'srfmajortext',
			'srftempmode',
			'srfuf',
			'srfdeid',
			'srfsourcekey',
			'arg0',
			'arg1',
			'thread_name',
			'reference_flag',
			'arg2',
			'time',
			'formatted_message',
			'event_id',
		];
	}
	get srfkey() {
		return this.$DO.id;
	}
	set srfkey(value: any) {
		this.$DO.id = value;
	}
	get srfmajortext() {
		return this.$DO.name;
	}
	set srfmajortext(value: any) {
		this.$DO.name = value;
	}
	get arg0() {
		return this.$DO.arg0;
	}
	set arg0(value: any) {
		this.$DO.arg0 = value;
	}
	get arg1() {
		return this.$DO.arg1;
	}
	set arg1(value: any) {
		this.$DO.arg1 = value;
	}
	get thread_name() {
		return this.$DO.ip_address;
	}
	set thread_name(value: any) {
		this.$DO.ip_address = value;
	}
	get reference_flag() {
		return this.$DO.status;
	}
	set reference_flag(value: any) {
		this.$DO.status = value;
	}
	get arg2() {
		return this.$DO.arg2;
	}
	set arg2(value: any) {
		this.$DO.arg2 = value;
	}
	get time() {
		return this.$DO.time;
	}
	set time(value: any) {
		this.$DO.time = value;
	}
	get formatted_message() {
		return this.$DO.message;
	}
	set formatted_message(value: any) {
		this.$DO.message = value;
	}
	get event_id() {
		return this.$DO.id;
	}
	set event_id(value: any) {
		this.$DO.id = value;
	}
	// 界面主键标识
	get auth_log() {
		return this.$DO.id;
	}

	set auth_log(value: any) {
		this.$DO.id = value;
	}

	//  工作流预置字段
	srfwfmemo: any;
	srffrontuf: any;

	//  无实体属性表单项
	get srftempmode() {
		return this.$DO.srftempmode;
	}

	set srftempmode(value: any) {
		this.$DO.srftempmode = value;
	}

	//  表单重复器

	/**
	 * 返回后台数据
	 *
	 * @return {*}
	 * @memberof FormControlVO
	 */
	public getDo() {
		return {
			srffrontuf: this.srffrontuf,
			arg0: this.$DO.arg0,
			arg1: this.$DO.arg1,
			ip_address: this.$DO.ip_address,
			status: this.$DO.status,
			arg2: this.$DO.arg2,
			time: this.$DO.time,
			message: this.$DO.message,
			id: this.$DO.id,
			name: this.$DO.name,
		};
	}
}
